package spring.cloud.tasks.client.batch_task_processor;

import lombok.Getter;
import lombok.Setter;
import spring.cloud.tasks.client.BatchTaskWorker;

public class TaskInstanceExecuterThread extends Thread {
    @Setter
    @Getter
    private BatchTaskWorker batchTaskWorker;
    @Setter
    @Getter
    private TaskInstanceExecuterThreadInfo taskInstanceThreadInfo;
    @Setter
    @Getter
    private Tasker batchTaskExecuter;
    @Setter
    @Getter
    private String parameter;
    @Setter
    @Getter
    private boolean needStop = false;
    @Setter
    @Getter
    private boolean stop = false;

    public void setStopFlag() {
        this.stop = true;
        if (this.batchTaskExecuter != null) {
            this.batchTaskExecuter.setStop(true);
        }
    }
}
